package ausruestung;

public class Waffe extends Ausruestung {
	protected int staerke;
	
	public Waffe(String name, int staerke, int preis) {
		super(name, preis);
		
		if (staerke < 0)
			staerke = 0;
		if (staerke > 10)
			staerke = 10;
		
		this.staerke = staerke;	
	}
	
	public int zuhauen(int geschick) {
		int schaden = this.staerke+geschick;
		if (schaden < 0)
			schaden = 0;
		
		return schaden;
	}
}
